package com.code2roc.xhood.model;

import java.util.ArrayList;
import java.util.List;

public class ObscureConfig {
    private String outPutPath;
    private String packageName;
    private List<String> obscurePackages;
    private List<String> obscureIgnorePackages;
    private List<String> obscureIgnoreClasss;
    private List<String> obscureOptionPackages;
    private List<String> obscureOptionIgnorePackages;
    private List<String> obscureOptionIgnoreClasss;

    public ObscureConfig() {
        packageName = "";
    }



    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public void setObscurePackages(List<String> obscurePackages) {
        this.obscurePackages = obscurePackages;
    }

    public void setObscureIgnorePackages(List<String> obscureIgnorePackages) {
        this.obscureIgnorePackages = obscureIgnorePackages;
    }

    public void setObscureIgnoreClasss(List<String> obscureIgnoreClasss) {
        this.obscureIgnoreClasss = obscureIgnoreClasss;
    }

    public void setObscureOptionPackages(List<String> obscureOptionPackages) {
        this.obscureOptionPackages = obscureOptionPackages;
    }

    public void setObscureOptionIgnorePackages(List<String> obscureOptionIgnorePackages) {
        this.obscureOptionIgnorePackages = obscureOptionIgnorePackages;
    }

    public void setObscureOptionIgnoreClasss(List<String> obscureOptionIgnoreClasss) {
        this.obscureOptionIgnoreClasss = obscureOptionIgnoreClasss;
    }

    public String getOutPutPath() {
        return outPutPath;
    }

    public void setOutPutPath(String outPutPath) {
        this.outPutPath = outPutPath;
    }

    public String getPackageName() {
        return packageName;
    }

    public List<String> getPackages() {
        if (obscureOptionPackages != null && obscureOptionPackages.size() > 0) {
            return obscureOptionPackages;
        }
        if (obscurePackages == null) {
            obscurePackages = new ArrayList<>();
        }
        return obscurePackages;
    }

    public List<String> getIgnorePackages() {
        if (obscureOptionIgnorePackages == null) {
            obscureOptionIgnorePackages = new ArrayList<>();
        }
        if (obscureIgnorePackages == null) {
            obscureIgnorePackages = new ArrayList<>();
        }
        List<String> mergeList = new ArrayList<>();
        mergeList.addAll(obscureIgnorePackages);
        mergeList.addAll(obscureOptionIgnorePackages);
        return mergeList;
    }

    public List<String> getIgnoreClasss() {
        if (obscureOptionIgnoreClasss == null) {
            obscureOptionIgnoreClasss = new ArrayList<>();
        }
        if (obscureIgnoreClasss == null) {
            obscureIgnoreClasss = new ArrayList<>();
        }
        List<String> mergeList = new ArrayList<>();
        mergeList.addAll(obscureIgnoreClasss);
        mergeList.addAll(obscureOptionIgnoreClasss);
        return mergeList;
    }


}
